package com.cfl.ticket.service.impl;

import java.util.ArrayList;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cfl.model.City;
import com.cfl.ticket.feign.TicketFeign;
import com.cfl.ticket.service.CityService;

@Service
public class CityServiceImpl implements CityService{

	@Autowired
	private TicketFeign ticketFeign;
	
	public City findCityByName(String name) throws Exception {
		try {
			return ticketFeign.findCityByName(name);
		} catch (Exception e) {
			throw e;
		}
	}
	
	public City findCityByCid(String cid) throws Exception {
		try {
			return ticketFeign.findCityByCid(cid);
		} catch (Exception e) {
			throw e;
		}
	}
	
	public ArrayList<City> findCityByAll() throws Exception {
		try {
			return ticketFeign.findCityByAll();
		} catch (Exception e) {
			throw e;
		}
	}
}
